<?php
require('config.php');
	$user_id=$_REQUEST['user_id'];
        $goods_id=$_REQUEST['goods_id'];
        $pan=$_REQUEST['pan'];
        $val=$_REQUEST['val'];
        $attr_id=$_REQUEST['attr_id'];
        if($pan=='isSelected')
        {
        	$sql="update ".$oto."_cart set isSelected='{$val}' where userId='{$user_id}' and goods_id='{$goods_id}' and goodss_attr_id='{$attr_id}'";
			$result=$db->query($sql);
        }
        else if($pan=='goods_num')
        {
        	$sql="update ".$oto."_cart set goods_num='{$val}' where userId='{$user_id}' and goods_id='{$goods_id}' and goodss_attr_id='{$attr_id}'";
			$result=$db->query($sql);
        }
		echo json_encode($result);
?>